package com.ex3.ylw.connector.http;

import org.apache.catalina.util.StringManager;

import java.io.OutputStream;
import java.net.Socket;

/**
 * 主要process方法
 * 1.创建HttpRequest
 * 2.创建HttpResponse
 * 3.解析HTTP请求的第一行和头信息，填充HttpRequest对象
 * 4.将HttpRequest对象和HttpResponse对象传递给ServletProcessor和StaticResourceProcessor
 * Created by yangliwei on 2017/7/25.
 */
public class HttpProcessor {

    /**
     * The HttpConnector with which this processor is associated.
     */
    private HttpConnector connector = null;
    private HttpRequest request;
    private HttpRequestLine requestLine = new HttpRequestLine();
    private HttpResponse response;

    protected String method = null;
    protected String queryString = null;

    /**
     * The string manager for this package.
     */
    protected StringManager sm =
            StringManager.getManager("ex03.pyrmont.connector.http");

    public HttpProcessor(HttpConnector connector) {
        this.connector = connector;
    }

    public void process(Socket socket) {
        SocketInputStream input = null;
        OutputStream output = null;

    }
}
